package code.c06;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/6 12:15
 * @package code.c06
 * @description 主板类
 */

public class MainBoard {
    String strCPU;
    VidioCard vc;

    public String getStrCPU() {
        return strCPU;
    }

    public void setStrCPU(String strCPU) {
        this.strCPU = strCPU;
    }

    public VidioCard getVc() {
        return vc;
    }

    public void setVc(VidioCard vc) {
        this.vc = vc;
    }

    public MainBoard(String strCPU, VidioCard vc) {
        this.strCPU = strCPU;
        this.vc = vc;
    }

    public MainBoard() {
    }

    void run(){
        System.out.println(strCPU);
        vc.display();
    }
}

interface VidioCard{
    String getName();

    void display();
}

class ASUS implements VidioCard{
    String name = "asus";

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void display() {
        System.out.println("fljskdf");
    }
}


